
from core.base import *

class StockModel:
	def __init__(self):
		self.item = Item()
		self.serial = 'abcde12345'
		self.price_sold = None

	def get_item_type(self):
		return self.item

	def set_item_type(self, item)
		self.item = item

	def get_serial(self):
		return self.serial

	def set_serial(self, serial):
		self.serial = serial

	def is_sold(self):
		return bool(self.price_sold)

	def get_sell_price(self):
		return self.price_sold

	def set_sell_price(self, sell_price):
		self.price_sold = sell_price


class StockController(BaseController):
	def get_all(self):
		stocks = []

		for i in range(0, 5):
			stocks.append(StockModel())

		self.update_views(stocks)
		return stocks

	def get_stocks_of(self, item):
		return []

